import config from '../config/config';
import request from '../utils/request';
// 贝壳排行榜
let service = {};
service.getRankingList = (param, cb) => {
  param = param || {};
  let getRankingList = config.api.getRankingList;
  request({
    url: getRankingList,
    // showLoading: true,
    data: param,
    method: 'GET',
    success: res => {
      cb(res);
    }
  });
};
//获取分享图片
service.getShareImage = (param, cb) => {
  param = param || {};
  let getShareImage = config.api.getShareImage;
  request({
    url: getShareImage,
    // showLoading: true,
    data: param,
    method: 'GET',
    success: res => {
      cb(res);
    }
  });
};
//判断每天的贝壳
service.shellBlue = (param, cb) => {
  param = param || {};
  let shellBlue = config.api.shellBlue;
  request({
    url: shellBlue,
    // showLoading: true,
    data: param,
    method: 'GET',
    success: res => {
      cb(res);
    }
  });
};

//2.12.0特惠贝壳商品列表
service.getcheap_goods = (param, cb) => {
  param = param || {};
  let requestUrl = config.api.getcheap_goods;
  request({
    url: requestUrl,
    // showLoading: true,
    data: param,
    method: 'GET',
    success: res => {
      cb(res);
    }
  });
}

//邀请好友签到获得抽奖次数
service.invitedsign = (param, cb) => {
  param = param || {};
  let requestUrl = config.api.invitedsign;
  request({
    url: requestUrl,
    // showLoading: true,
    data: param,
    method: 'GET',
    success: res => {
      cb(res);
    }
  });
}
module.exports = service;